<div>
    <div class="row">
        <div class="col-lg-12">
            <div class="ibox ">
                <div class="ibox-title">
                    <h5><span><vc:i18n name="查询条件" namespace="batchPayFeeOrder"></vc:i18n></span></h5>
                </div>
                <div class="ibox-content">
                    <div class="row">
                        <div class="col-sm-1 text-right">
                            <div class="form-group">
                                收费对象
                            </div>
                        </div>
                        <div class="col-sm-11">
                            <div class="form-group">
                                <span class="margin-right" v-for="(item,index) in batchPayFeeOrderInfo.payObjs">
                                    <input type="checkbox" class="i-checks checkItem" v-bind:value="item" v-model="batchPayFeeOrderInfo.payerObjNames" @change="_chanagePayerObjName()"> {{item}}
                                </span>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="row">
        <div class="col-lg-12">
            <div class="ibox">
                <div class="ibox-title">
                    <h5><span><vc:i18n name="批量缴费" namespace="batchPayFeeOrder"></vc:i18n></span></h5>
                    <div class="ibox-tools" style="top:10px;">
                        <button type="button" class="btn btn-white btn-sm" v-on:click="_exportExcel('xlsx')">
                            <vc:i18n name="缴费申请单" namespace="batchPayFeeOrder"></vc:i18n>
                        </button>
                        <button type="button" class="btn btn-white btn-sm" v-on:click="_goBack()">
                            <vc:i18n name="返回" ></vc:i18n>
                        </button>
                    </div>
                </div>
                <div class="ibox-content">
                    <table id="batchTable" class="footable table table-stripped toggle-arrow-tiny" data-page-size="15">
                        <thead>
                            <tr>
                                <th class="text-center"><input type="checkbox" class="i-checks" @click="checkAll($event)"></th>
                                <th class="text-center"><span><vc:i18n name="费用类型" namespace="batchPayFeeOrder"></vc:i18n></span></th>
                                <th class="text-center"><span><vc:i18n name="费用项目" namespace="batchPayFeeOrder"></vc:i18n></span></th>
                                <th class="text-center"><span><vc:i18n name="费用标识" namespace="batchPayFeeOrder"></vc:i18n></span></th>
                                <th class="text-center"><span><vc:i18n name="收费对象" namespace="batchPayFeeOrder"></vc:i18n></span></th>
                                <th class="text-center"><span><vc:i18n name="计费起始时间" namespace="batchPayFeeOrder"></vc:i18n></span></th>
                                <th class="text-center"><span><vc:i18n name="计费结束时间" namespace="batchPayFeeOrder"></vc:i18n></span></th>
                                <th class="text-center"><span><vc:i18n name="欠费金额" namespace="batchPayFeeOrder"></vc:i18n></span></th>
                                <th class="text-center">
                                    <div style="width: 100px; margin:0 auto"><span><vc:i18n name="缴费周期" namespace="batchPayFeeOrder"></vc:i18n></span></div>
                                </th>
                                <th class="text-center">
                                    应收
                                </th>
                                <th class="text-center">
                                    <div style="width: 150px; margin:0 auto"><span><vc:i18n name="实收" namespace="batchPayFeeOrder"></vc:i18n></span></div>
                                </th>
                                <th class="text-center">
                                    <div style="width: 100px; margin:0 auto"><span><vc:i18n name="备注" namespace="batchPayFeeOrder"></vc:i18n></span></div>
                                </th>
                            </tr>
                        </thead>
                        <tbody>
                            <tr v-for="batchFee in batchPayFeeOrderInfo.batchFees">
                                <td class="text-center">
                                    <input type="checkbox" class="i-checks checkItem" v-bind:value="batchFee.feeId" v-model="batchPayFeeOrderInfo.selectPayFeeIds">
                                </td>
                                <td class="text-center">{{batchFee.feeTypeCdName}}</td>
                                <td class="text-center">{{batchFee.feeName}}</td>
                                <td class="text-center">{{batchFee.feeFlagName}}</td>
                                <td class="text-center">{{_getBatchPayFeeRoomName(batchFee)}}</td>
                                <td class="text-center">{{_getEndTime(batchFee)}}</td>
                                <td class="text-center"> {{_getDeadlineTime(batchFee)}}</td>
                                <td class="text-center">{{batchFee.amountOwed}}</td>
                                <td class="text-center">
                                    <div style="width: 100px; margin:0 auto" v-if="batchFee.feeFlag == '1003006'">
                                        <select class="custom-select" v-model="batchFee.cycles" @change="_changeMonth(batchFee.cycles,batchFee)">
                                            <option selected disabled value="">{{vc.i18n('请选择缴费周期','batchPayFeeOrder')}}</option>
                                            <option v-for="item in _getBatchPaymentCycles(batchFee)" :value="item">{{item}}{{vc.i18n('个月','batchPayFeeOrder')}}</option>
                                        </select>
                                    </div>
                                    <div v-else>
                                        -
                                    </div>
                                </td>
                                <td class="text-center">{{batchFee.receivableAmount}}</td>
                                <td class="text-center">
                                    <div style="width: 150px; margin:0 auto" v-if="batchFee.receivedAmountSwitch=='1'" @change="_doComputeTotalFee()">
                                        <input type="text" :placeholder="vc.i18n('请输入实际金额','batchPayFeeOrder')" v-model="batchFee.receivedAmount" class="form-control">
                                    </div>
                                    <div v-else>
                                        {{batchFee.receivedAmount}}
                                    </div>
                                </td>
                                <td class="text-center">
                                    <div style="width: 200px; margin:0 auto">
                                        <input type="text" :placeholder="vc.i18n('请输入备注','batchPayFeeOrder')" v-model="batchFee.remark" class="form-control">
                                    </div>
                                </td>
                            </tr>
                        </tbody>
                        <tfoot>
                            <tr>
                                <td colspan="8">
                                    <ul class="pagination float-right"></ul>
                                </td>
                            </tr>
                        </tfoot>
                    </table>
                    <div>
                        温馨提示：批量缴费不支持优惠折扣，账户扣款和优惠券抵扣功能，如需要请到缴费页面缴费
                        <br/>
                        <b>缴费金额：缴费金额等于所有实收</b>
                    </div>
                </div>

            </div>
        </div>
    </div>

    <div class="row">
        <div class="col-md-9"></div>
        <div class="col-md-2">
            缴费金额：<span style="font-size: 30px; color: red; padding-left: 0px;">{{batchPayFeeOrderInfo.feePrices}}<span><vc:i18n name="元" namespace="batchPayFeeOrder"></vc:i18n></span></span>
        </div>
        <div class="col-md-1 " style="margin-bottom:10px; text-align:right">
            <button type="button" class="btn  btn-warning  btn-lg btn-block" style="margin-left:10px;" v-on:click="_payFee()"><span><vc:i18n name="缴费" namespace="batchPayFeeOrder"></vc:i18n></span>
            </button>
        </div>
    </div>

    <div id="doBatchPayFeeModal" class="modal" tabindex="-1" role="dialog">
        <div class="modal-dialog" role="document">
            <div class="modal-content">
                <div class="modal-header">
                    <h5 class="modal-title"><span><vc:i18n name="收费确认" namespace="batchPayFeeOrder"></vc:i18n></span></h5>
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                        <span aria-hidden="true">&times;</span>
                    </button>
                </div>
                <div class="modal-body">
                    <div class="row">
                        <label class="col-sm-3 col-form-label"><span><vc:i18n name="金额" namespace="batchPayFeeOrder"></vc:i18n></span>：</label>
                        <label class="col-sm-9 col-form-label">{{batchPayFeeOrderInfo.feePrices}}<span><vc:i18n name="元" namespace="batchPayFeeOrder"></vc:i18n></span></label>
                    </div>
                    <div class="row form-group">
                        <label class="col-sm-3 col-form-label"><span><vc:i18n name="支付方式" namespace="batchPayFeeOrder"></vc:i18n></span>:</label>
                        <div class="col-sm-9">
                            <select class="custom-select" v-model="batchPayFeeOrderInfo.primeRate">
                                <option selected disabled value="">{{vc.i18n('必填','batchPayFeeOrder')}}，请选择支付方式</option>
                                <option v-for="(item,index) in batchPayFeeOrderInfo.primeRates" :key="index" v-if="item.statusCd != '5' && item.statusCd != '6'"
                                        :value="item.statusCd">{{item.name}}
                                </option>
                            </select>
                        </div>
                    </div>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-secondary" @click="_closeDoBatchPayFeeModal()"><span><vc:i18n name="关闭" namespace="batchPayFeeOrder"></vc:i18n></span></button>
                    <button type="button" class="btn btn-primary" @click="_doPayFee()"><span><vc:i18n name="确定收费" namespace="batchPayFeeOrder"></vc:i18n></span></button>
                </div>
            </div>
        </div>
    </div>


    <div id="payFeeResult" class="modal" tabindex="-1" role="dialog">
        <div class="modal-dialog" role="document">
            <div class="modal-content">
                <div class="modal-header">
                    <h5 class="modal-title"><span><vc:i18n name="缴费提示" namespace="batchPayFeeOrder"></vc:i18n></span></h5>
                    <button type="button " class="close" data-dismiss="modal" aria-label="Close">
                        <span aria-hidden="true">&times;</span>
                    </button>
                </div>
                <div class="modal-body">
                    <p><span><vc:i18n name="缴费成功" namespace="batchPayFeeOrder"></vc:i18n></span></p>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-secondary" @click="_back()"><span><vc:i18n name="返回" namespace="batchPayFeeOrder"></vc:i18n></span></button>
                    <button type="button" class="btn btn-primary" @click="_printAndBack()"><span><vc:i18n name="打印收据" namespace="batchPayFeeOrder"></vc:i18n></span></button>
                </div>
            </div>
        </div>
    </div>
</div>